// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_MST_POSITION
// * CreateDate    : 2011/8/16 10:16:40
// * Creater       : CodeSmith
// * LastChangeDate: 2011/8/16 10:16:40
// * LastChanger   : 2011/8/16 10:16:40
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class MstPositionEntity : EntityBase
    {
        public MstPositionTable TableSchema
        {
            get
            {
                return MstPositionTable.Current;
            }
		}
		
		public MstPositionEntity()
        {

        }
		
		public MstPositionEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.PositionId = Convert.ToString(CommonFunctions.ToObject(dr["POSITION_ID"]));
			this.PositionCode = Convert.ToString(CommonFunctions.ToObject(dr["POSITION_CODE"]));
			this.PositionName = Convert.ToString(CommonFunctions.ToObject(dr["POSITION_NAME"]));
			this.Level = Convert.ToString(CommonFunctions.ToObject(dr["LEVEL"]));
			this.DeleteFlag = Convert.ToInt32(CommonFunctions.ToObject(dr["DELETE_FLAG"]));
			this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
        }
		
		public MstPositionEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.PositionId = Convert.ToString(CommonFunctions.ToObject(dr["POSITION_ID"]));
			this.PositionCode = Convert.ToString(CommonFunctions.ToObject(dr["POSITION_CODE"]));
			this.PositionName = Convert.ToString(CommonFunctions.ToObject(dr["POSITION_NAME"]));
			this.Level = Convert.ToString(CommonFunctions.ToObject(dr["LEVEL"]));
			this.DeleteFlag = Convert.ToInt32(CommonFunctions.ToObject(dr["DELETE_FLAG"]));
			this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return MstPositionTable.Current;
            }
        }
		
		#region Perporty List
        public string PositionId
        {
            get { return Convert.ToString(GetData(MstPositionTable.C_POSITION_ID)); }
            set { SetData(MstPositionTable.C_POSITION_ID, value); }
        }
		
        public string PositionCode
        {
            get { return Convert.ToString(GetData(MstPositionTable.C_POSITION_CODE)); }
            set { SetData(MstPositionTable.C_POSITION_CODE, value); }
        }
		
        public string PositionName
        {
            get { return Convert.ToString(GetData(MstPositionTable.C_POSITION_NAME)); }
            set { SetData(MstPositionTable.C_POSITION_NAME, value); }
        }
		
        public string Level
        {
            get { return Convert.ToString(GetData(MstPositionTable.C_LEVEL)); }
            set { SetData(MstPositionTable.C_LEVEL, value); }
        }
		
        public int DeleteFlag
        {
            get { return Convert.ToInt32(GetData(MstPositionTable.C_DELETE_FLAG)); }
            set { SetData(MstPositionTable.C_DELETE_FLAG, value); }
        }
		
        public string Description
        {
            get { return Convert.ToString(GetData(MstPositionTable.C_DESCRIPTION)); }
            set { SetData(MstPositionTable.C_DESCRIPTION, value); }
        }
		
		#endregion
	}
	
	
}	

